<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>

<div id="box">
	<div class="blue red green">blue red green</div>
</div>
<div class="blue red  black">blue red  black</div>
<script>
var divs = document.getElementById("box").getElementsByClassName("blue red");

for(var i=0; i<divs.length;i++){
	console.log(divs[i].innerHTML);
}


</script>




</body>
</html>
